package com.coc.service;

import com.coc.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT",fallbackFactory =DeptServiceFallBackFactory.class )
public interface DeptService {

    @GetMapping("/queryDepts")
    public Object queryDepts();
    @GetMapping("/add")
    public Integer add(Dept dept);

    @GetMapping("/delete")
    public Integer delete(Integer deptNo);

    @GetMapping("/getById")
    Dept selectById(@RequestParam(value = "deptNo",defaultValue = "0") Integer deptNo);
}
